/*
 * Copyright (c) 2008-2010, Petr Panteleyev
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 *    1. Redistributions of source code must retain the above copyright notice, 
 *       this list of conditions and the following disclaimer.
 *    2. Redistributions in binary form must reproduce the above copyright notice, 
 *       this list of conditions and the following disclaimer in the documentation 
 *       and/or other materials provided with the distribution.
 *    3. The name of the author may not be used to endorse or promote products 
 *       derived from this software without specific prior written permission.
 *  
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.panteleyev.livejournal;

import java.util.ResourceBundle;

import org.panteleyev.utilities.ArrayResourceBundle;

/**
 *
 * @author Petr Panteleyev
 */
enum L10N {
    /* Misc */
    LIVEJOURNAL_MENU_NAME(34),
    CHECK_FRIENDS_NOTIFICATION_MESSAGE(63),

    BIRTHDAYS_REMINDER_DIALOG_TITLE(94),
    
    /* FBGalleryWindow */
    FBGW_UPLOAD_PICTURE_ACTION(0),
    FBGW_OPEN_PICTURE_EXTERNAL_ACTION(1),
    FBGW_PUBLISH_PICTURES_ACTION(2),

    /* FBGalleryDialog */
    FBGALLERY_DIALOG_TITLE(113),
    FBGALLERY_DIALOG_NAME_LABEL(114),
    FBGALLERY_DIALOG_PARENT_LABEL(115),
    FBGALLERY_DIALOG_DATE_LABEL(116),
    
    /* FotoBilderFrame */
    FBF_TITLE(65),
    FBF_UPDATE_GALLERIES_ACTION(47),
    FBF_UPDATE_PICTURES_ACTION(48),
    FBF_OPEN_GALLERY_EXTERNAL_ACTION(49),
    FBF_CREATE_GALLERY_ACTION(50),
    FBF_ALBUMS_TAB_TITLE(145),
    FBF_GALLERY_MENU_TITLE(146),
    
    /* AdminConsoleWindow */
    ADMIN_CONSOLE_TITLE(7),
    ADMIN_CONSOLE_EXECUTE_ACTION(8),
    ADMIN_CONSOLE_COMMAND_LABEL(9),
    
    /* FriendsWindow */
    FRIENDS_WINDOW_TITLE(10),
    FRIENDS_WINDOW_FRIENDS_LABEL(11),
    FRIENDS_WINDOW_FRIENDSOF_LABEL(12),
    FRIENDS_WINDOW_SYNDICATED_LABEL(13),
    FRIENDS_WINDOW_MUTUAL_LABEL(14),
    FRIENDS_WINDOW_COMMUNITIES_LABEL(15),
    FRIENDS_WINDOW_FRIENDS_TAB(16),
    FRIENDS_WINDOW_GROUPS_TAB(17),
    FRIENDS_WINDOW_BANNED_TAB(90),
    FRIENDS_WINDOW_GROUPS_LABEL(18),
    FRIENDS_WINDOW_FRIENDS_IN_LABEL(19),
    FRIENDS_WINDOW_FRIENDS_NOT_IN_LABEL(20),
    FRIENDS_WINDOW_PUBLIC_GROUP_CHECKBOX(21),
    FRIENDS_WINDOW_ADD_FRIEND_ACTION(23),
    FRIENDS_WINDOW_REMOVE_FRIEND_ACTION(24),
    FRIENDS_WINDOW_BAN_FRIEND_ACTION(25),
    FRIENDS_WINDOW_UNBAN_ACTION(93),
    FRIENDS_WINDOW_FRIEND_JOURNAL_ACTION(26),
    FRIENDS_WINDOW_FRIEND_INFO_ACTION(27),
    FRIENDS_WINDOW_FRIEND_CALENDAR_ACTION(28),
    FRIENDS_WINDOW_FRIEND_FRIENDS_ACTION(29),
    FRIENDS_WINDOW_ADD_GROUP_ACTION(30),
    FRIENDS_WINDOW_REMOVE_GROUP_ACTION(31),
    FRIENDS_WINDOW_GROUP_UP_ACTION(32),
    FRIENDS_WINDOW_GROUP_DOWN_ACTION(33),
    FRIENDS_WINDOW_TABLE_USERNAME(60),
    FRIENDS_WINDOW_TABLE_FULL_NAME(61),
    FRIENDS_WINDOW_TABLE_BIRTHDAY(62),
    FRIENDS_WINDOW_GROUPS_MENU_TITLE(22),
    FRIENDS_WINDOW_GROUP_SAVE_ACTION(64),
    FRIENDS_WINDOW_BANNED_TABLE_USER(91),
    FRIENDS_WINDOW_BANNED_TABLE_COMMENT(92),
    FRIENDS_WINDOW_INITIAL_LOAD_QUESTION(140),
    
    EDITOR_FRAME_INSERT_ADV_USER_ACTION(35), 
    EDITOR_FRAME_TO_MANY_JOURNALS_CHECKBOX(36),
    EDITOR_FRAME_MOOD_LABEL(66),
    EDITOR_FRAME_MUSIC_LABEL(67),
    EDITOR_FRAME_LOCATION_LABEL(68),
    EDITOR_FRAME_TAGS_LABEL(69),
    EDITOR_FRAME_ACCESS_LEVEL_LABEL(70),
    EDITOR_FRAME_SCREEN_COMMENTS_LABEL(71),
    EDITOR_FRAME_ADULT_CONTENT_LABEL(72),
    EDITOR_FRAME_MANUAL_DATE_CHECBOX(73),
    EDITOR_FRAME_BACKDATE_CHECKBOX(74),
    EDITOR_FRAME_NO_AUTOFORMAT_CHECKBOX(75),
    EDITOR_FRAME_NO_COMMENTS_CHECKBOX(76),
    EDITOR_FRAME_NO_EMAIL_CHECKBOX(77),
    
    /* History Frame */
    HISTORY_FRAME_CHANGE_ATTRIBUTES_ACTION(78),
    HISTORY_FRAME_UPDATE_COMMENTS_ACTION(79),
    
    /* CommentsFrame */
    COMMENTS_FRAME_TITLE(83),
    COMMENTS_FRAME_COMMENT_DELETED(80),
    COMMENTS_FRAME_COMMENT_SCREENED(81),
    COMMENTS_FRAME_COMMENT_NO_SUBJECT(82),
    
    /* OutboxFrame */
    OUTBOX_FRAME_TABLE_HEADER_DATE(84),             // not used
    OUTBOX_FRAME_TABLE_HEADER_JOURNAL(85),
    OUTBOX_FRAME_TABLE_HEADER_SUBJECT(86),          // not used
    
    /* FriendListChangeDialog */
    FRIEND_LIST_CHANGE_DIALOG_TITLE(87),
    
    /* GroupMaskDialog */
    GROUP_MASK_DIALOG_TITLE(88),
    
    /* SharedJournalSelectionDialog */
    JOURNAL_SELECTION_DIALOG_TITLE(89),
    
    LJCUT_MENU_WITH_TEXT(37),
    LJCUT_MENU_CLOSE(38),
    LJCUT_MENU_SURROUND(39),
    
    /* LJUserProfile menu */
    LJPROF_FRIENDS_ACTION(40),
    LJPROF_EDIT_LAST_POST_ACTION(41),
    LJPROF_GALLERY_ACTION(42),
    LJPROF_ADMIN_CONSOLE_ACTION(43),
    LJPROF_RECENT_ENTRIES_ACTION(44),
    LJPROF_CALENDAR_ACTION(45),
    LJPROF_WEB_FRIENDS_ACTION(46),

    /* LJProfileDialog */
    LJPROF_DIALOG_CHECK_FRIENDS_CHECKBOX(117),
    LJPROF_DIALOG_GROUPS_LABEL(118),
    LJPROF_DIALOG_CHECK_ALL_RADIO(119),
    LJPROF_DIALOG_CHECK_SELECTED_RADIO(120),
    LJPROF_DIALOG_REMIND_BIRTHDAYS_CHECKBOX(121),
    LJPROF_DIALOG_DAYS_POSTFIX(122),
    LJPROF_DIALOG_DAYS_PREFIX(123),
    LJPROF_DIALOG_UPDATE_COMMENTS_BORDER(124),
    LJPROF_DIALOG_ONCE_RADIO(125),
    LJPROF_DIALOG_EVERY_UPDATE_RADIO(126),
    LJPROF_DIALOG_NEVER_RADIO(127),
    LJPROF_DIALOG_CLEAR_INFO_BUTTON(128),
    LJPROF_DIALOG_CLEAR_COMMENTS_BUTTON(129),
    LJPROF_DIALOG_FRIENDS_TAB_TITLE(130),
    LJPROF_DIALOG_COMMENTS_TAB_TITLE(131),
    LJPROF_DIALOG_MAIN_TAB_TITLE(132),
    
    /* LJ Post security types */
    LJ_SECURITY_PUBLIC(51),
    LJ_SECURITY_PRIVATE(52),
    LJ_SECURITY_FRIENDS(53),
    LJ_SECURITY_CUSTOM(54),
    
    /* LJ Screening types */
    LJ_SCREEN_DEFAULT(55),
    LJ_SCREEN_NO(56),
    LJ_SCREEN_ANONYMOUS(57),
    LJ_SCREEN_NON_FRIENDS(58),
    LJ_SCREEN_ALL(59),

    /* Friend Dialog */
    FRIEND_DIALOG_GROUPS(95),
    FRIEND_DIALOG_COLORS(96),
    FRIEND_DIALOG_FOREGROUND(97),
    FRIEND_DIALOG_BACKGROUND(98),
    FRIEND_DIALOG_TITLE_ADD(99),
    FRIEND_DIALOG_TITLE_EDIT(100),

    /* Change Attributes Dialog */
    CHATTR_DIALOG_TITLE(101),
    CHATTR_DIALOG_ACCESS_LEVEL_CHECKBOX(102),
    CHATTR_DIALOG_SCREEN_COMMENTS_CHECKBOX(103),
    CHATTR_DIALOG_MOOD_CHECKBOX(104),
    CHATTR_DIALOG_MUSIC_CHECKBOX(105),
    CHATTR_DIALOG_LOCATION_CHECKBOX(106),
    CHATTR_DIALOG_USERPIC_CHECKBOX(107),

    /* Event Access Dialog */
    EA_DIALOG_TITLE(108),
    EA_DIALOG_PUBLIC_RADIO(109),
    EA_DIALOG_PRIVATE_RADIO(110),
    EA_DIALOG_FRIENDS_RADIO(111),
    EA_DIALOG_CUSTOM_RADIO(112),

    /* PicturePublishDialog */
    PPD_ANNOTATION_CHECKBOX(133),

    /* AdvancedUserReferenceDialog */
    USER_REF_DIALOG_TITLE(134),
    USER_REF_DIALOG_SERVER_LABEL(135),
    USER_REF_DIALOG_USERNAME_LABEL(136),
    USER_REF_DIALOG_LINK_TEXT_LABEL(137),
    USER_REF_DIALOG_COMMUNITY_CHECKBOX(138),
    USER_REF_DIALOG_ICON_CHECKBOX(139),
    
    /* Repost dialog */
    REPOST_DIALOG_TITLE(141),
    REPOST_DIALOG_BUTTON_TEXT(142),
    REPOST_DIALOG_EXCERPT(143),
    INSERT_REPOST_ACTION(144),
    
    /* Misc */
    VKONTAKTE(147),

    /* LJ Adult Content Types */
    LJ_ADULT_CONTENT_DEFAULT(3),
    LJ_ADULT_CONTENT_NONE(4),
    LJ_ADULT_CONTENT_CONCEPTS(5),
    LJ_ADULT_CONTENT_EXPLICIT(6);    
    
    private String l10nValue;
    
    public String s() {
        return l10nValue;
    }

    L10N(int key) {
        l10nValue = ((ArrayResourceBundle)ResourceBundle.getBundle("org.panteleyev.livejournal.L10NStrings")).getString(key);
    }    
}
